package StudyCode.summary.myfile;

import java.math.BigInteger;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class ParsingFormattingByteArray {
	public static void main(String[] argv) {
		byte[] bytes = new byte[]{(byte) 0x12, (byte) 0x0F, (byte) 0xF0};

		BigInteger bigInteger = new BigInteger(bytes);
		System.out.println("bytes 解析结果:" + bigInteger);
		String s = bigInteger.toString(2);
		System.out.println("bytes 解析结果转为二进制:" + s);
		s = bigInteger.toString(8);
		System.out.println("bytes 解析结果转为八进制:" + s);

		s = bigInteger.toString(16);
		System.out.println("bytes 解析结果转为十六进制:" + s);
	}
}
